When checking whitelist of extensions, only count last extension.
authorBrian Wolff <bawolff+wn@gmail.com>
Sun, 9 Mar 2014 09:08:19 +0000 (06:08 -0300)
committerBrian Wolff <bawolff+wn@gmail.com>
Sun, 9 Mar 2014 09:12:04 +0000 (06:12 -0300)
commit3090ace527df340015aca6dcb5a14d8f94838d18
treee03d87390880966d005ba14925642aa782f0477a
parent83dd6d7e3d51ef3ab91f081009cb9ccbe9b7d94b
When checking whitelist of extensions, only count last extension.

When we are doing blacklisted extensions, we count all extensions
as some programs (like apache sometimes) consider extensions that
aren't the final extension. However when doing whitelists we need
to only count the last extension, otherwise people can name files
foo.goodExt.BadExt. For example [[commons:File:Deamado ko.png.bmp]]

I do not believe this represents a security risk as bad files are
still filtered out. However it does allow unwanted files to be
uploaded.

Bug: 62451
Change-Id: Ie27c15f749812710571f432bc5915e498f8017e3
includes/upload/UploadBase.php